package com.qingzhuge.verification.enums;

import com.qingzhuge.common.IBaseEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.HashMap;
import java.util.Map;

/**
 * @author : zero.xiao
 * @description : 云系统类型
 * @date : 2018/10/8 0008 下午 19:46
 * @modified :
 * @since :
 */
@ApiModel("认证系统平台")
public enum EnumCloudType implements IBaseEnum<String> {
    /**腾讯云*/
    @ApiModelProperty("腾讯云")
    tencentcloud("tencentcloud"),
    /**阿里云*/
    aliyun("aliyun"),
    /**阿里云H5*/
    aliyunh5("aliyunh5");

    private final String value;
    private final static Map<String, EnumCloudType> VALUE_CACHE = new HashMap<>();

    static {
        for (EnumCloudType c : values()) {
            VALUE_CACHE.put(c.value, c);
        }
    }

    EnumCloudType(String value) {
        this.value = value;
    }

    @Override
    public String value() {
        return this.value;
    }

    public static EnumCloudType fromValue(String value) {
        return VALUE_CACHE.get(value);
    }

    @Override
    public String toString() {
        return this.value;
    }
}
